﻿﻿

//警告メッセージ出す
function alert_Custom(message){
	var html = "";
	var htmlBtn = "";
	var msg = "";

	html += "<table width='100%'>\n";

	html += "<tr>\n";
	html += "	<td style='font-size:20px; color:red; border-left: 20px transparent solid;'>\n";
	html += "			<br>"+ message +"</br>";
	html += "	</td>\n";
	html += "</tr>\n";

	html += "</table>\n";

	htmlBtn ="";

	htmlBtn += "<table'>\n";
	htmlBtn += "<tr>\n";
	htmlBtn += "	<td  align = 'left'>　　　　　　";
	htmlBtn += "		<input type='button' id='opCustumBtn' class='btnNo' onclick = 'back();'  value='はい'>";
	htmlBtn += "	</td>";

	htmlBtn += "</tr>\n";
	htmlBtn += "</table>\n";


	document.getElementById("opAlert").innerHTML = html;
	document.getElementById("opAlertBtn").innerHTML = htmlBtn;

	document.getElementById("opAlert").style.display = "inline";
	document.getElementById("opAlertButton").style.display = "inline";
	document.getElementById("opAlertBtn").style.display = "inline";
	document.getElementById("opAlertTop").style.display = "inline";
	//ポップアップ以外は非活性
	document.getElementById("allbackgr").style.display = "inline";
}

//警告メッセージ出す
/**
 * alertを実行すると後のjavascriptが押下された後に実行されない為に追加
 * 引数１：メッセージ
 * 引数２：実行して「はい」を押下した時の後イベント
 */
function alert_Custom2(message,afterFunc){

	var html = "";
	var htmlBtn = "";
	var msg = "";

	html += "<table width='100%'>\n";

	html += "<tr>\n";
	html += "	<td style='font-size:20px; color:red; border-left: 20px transparent solid;'>\n";
	html += "			<br>"+ message +"</br>";
	html += "	</td>\n";
	html += "</tr>\n";

	html += "</table>\n";

	htmlBtn ="";

	htmlBtn += "<table'>\n";
	htmlBtn += "<tr>\n";
	htmlBtn += "	<td  align = 'left'>　　　　　　";
	htmlBtn += "		<input type='button' id='opCustumBtn' class='btnNo' onclick = \""+afterFunc+"back();\"  value='はい'>";
	htmlBtn += "	</td>";

	htmlBtn += "</tr>\n";
	htmlBtn += "</table>\n";


	document.getElementById("opAlert").innerHTML = html;
	document.getElementById("opAlertBtn").innerHTML = htmlBtn;

	document.getElementById("opAlert").style.display = "inline";
	document.getElementById("opAlertButton").style.display = "inline";
	document.getElementById("opAlertBtn").style.display = "inline";
	document.getElementById("opAlertTop").style.display = "inline";
	//ポップアップ以外は非活性
	document.getElementById("allbackgr").style.display = "inline";
}



//確認メッセージ出す
function confirm_Custom(message){

	var html = "";
	var htmlBtn = "";
	var msg = "";

	html += "<table width='100%'>\n";

	html += "<tr>\n";
	html += "	<td style='font-size:20px; color:blue; border-left: 20px transparent solid;'>\n";
	html += "			<br>"+ message +"</br>";
	html += "	</td>\n";
	html += "</tr>\n";

	html += "</table>\n";

	htmlBtn ="";

	htmlBtn += "<table'>\n";
	htmlBtn += "<tr>\n";
	htmlBtn += "	<td  align = 'left'>　　　　　　";
	htmlBtn += "		<input type='button' id='opCustumBtn' class='btnYes' onclick='mainForm.submit();'  value='はい'> <input type='button' id='opCustumBtn' class='btnNo2' onclick = 'back();'  value='いいえ'>";
	htmlBtn += "	</td>";

	htmlBtn += "</tr>\n";
	htmlBtn += "</table>\n";


	document.getElementById("opAlert").innerHTML = html;
	document.getElementById("opAlertBtn").innerHTML = htmlBtn;

	document.getElementById("opAlert").style.display = "inline";
	document.getElementById("opAlertButton").style.display = "inline";
	document.getElementById("opAlertBtn").style.display = "inline";
	document.getElementById("opAlertTop").style.display = "inline";
	//ポップアップ以外は非活性
	document.getElementById("allbackgr").style.display = "inline";
}





//確認メッセージ出す（発注方法を変えた場合）
function confirm_Custom2(message, orderPlan){

	var html = "";
	var htmlBtn = "";
	var msg = "";

	html += "<table width='100%'>\n";

	html += "<tr>\n";
	html += "	<td style='font-size:20px; color:blue; border-left: 20px transparent solid;'>\n";
	html += "			<br>"+ message +"</br>";
	html += "	</td>\n";
	html += "</tr>\n";

	html += "</table>\n";

	htmlBtn ="";

	htmlBtn += "<table'>\n";
	htmlBtn += "<tr>\n";
	htmlBtn += "	<td  align = 'left'>　　　　　　";
	htmlBtn += "		<input type='button' id='opCustumBtn' class='btnYes' onclick='orderPlanSelected("+orderPlan+");'  value='はい'> <input type='button' id='opCustumBtn' class='btnNo2' onclick = 'back();'  value='いいえ'>";
	htmlBtn += "	</td>";

	htmlBtn += "</tr>\n";
	htmlBtn += "</table>\n";


	document.getElementById("opAlert").innerHTML = html;
	document.getElementById("opAlertBtn").innerHTML = htmlBtn;

	document.getElementById("opAlert").style.display = "inline";
	document.getElementById("opAlertButton").style.display = "inline";
	document.getElementById("opAlertBtn").style.display = "inline";
	document.getElementById("opAlertTop").style.display = "inline";
	//ポップアップ以外は非活性
	document.getElementById("allbackgr").style.display = "inline";
}

//確認メッセージ出す
/**
 * confirmを実行すると後のjavascriptが押下された後に実行されない為に追加
 * 引数１：メッセージ
 * 引数２：実行して「はい」を押下した時の後イベント
 */
function confirm_Custom3(message,afterFunc){

	var html = "";
	var htmlBtn = "";
	var msg = "";

	html += "<table width='100%'>\n";

	html += "<tr>\n";
	html += "	<td style='font-size:20px; color:blue; border-left: 20px transparent solid;'>\n";
	html += "			<br>"+ message +"</br>";
	html += "	</td>\n";
	html += "</tr>\n";

	html += "</table>\n";

	htmlBtn ="";

	htmlBtn += "<table'>\n";
	htmlBtn += "<tr>\n";
	htmlBtn += "	<td  align = 'left'>　　　　　　";
	htmlBtn += "		<input type='button' id='opCustumBtn' class='btnYes' onclick=\""+afterFunc+"\"  value='はい'> <input type='button' id='opCustumBtn' class='btnNo2' onclick = 'back();'  value='いいえ'>";
	htmlBtn += "	</td>";

	htmlBtn += "</tr>\n";
	htmlBtn += "</table>\n";


	document.getElementById("opAlert").innerHTML = html;
	document.getElementById("opAlertBtn").innerHTML = htmlBtn;

	document.getElementById("opAlert").style.display = "inline";
	document.getElementById("opAlertButton").style.display = "inline";
	document.getElementById("opAlertBtn").style.display = "inline";
	document.getElementById("opAlertTop").style.display = "inline";
	//ポップアップ以外は非活性
	document.getElementById("allbackgr").style.display = "inline";
}







//知らせメッセージ出す
/**
* alertを実行すると後のjavascriptが押下された後に実行されない為に追加
* 引数１：メッセージ
* 引数２：実行して「はい」を押下した時の後イベント
*/
function alert_Info2(message,afterFunc){

	var html = "";
	var htmlBtn = "";
	var msg = "";

	html += "<table width='100%'>\n";

	html += "<tr>\n";
	html += "	<td style='font-size:20px; color:blue; border-left: 20px transparent solid;'>\n";
	html += "			<br>"+ message +"</br>";
	html += "	</td>\n";
	html += "</tr>\n";

	html += "</table>\n";

	htmlBtn ="";

	htmlBtn += "<table'>\n";
	htmlBtn += "<tr>\n";
	htmlBtn += "	<td  align = 'left'>　　　　　　";
	htmlBtn += "		<input type='button' id='opCustumBtn' class='btnNo' onclick = \""+afterFunc+"back();\"  value='はい'>";
	htmlBtn += "	</td>";

	htmlBtn += "</tr>\n";
	htmlBtn += "</table>\n";


	document.getElementById("opAlert").innerHTML = html;
	document.getElementById("opAlertBtn").innerHTML = htmlBtn;

	document.getElementById("opAlert").style.display = "inline";
	document.getElementById("opAlertButton").style.display = "inline";
	document.getElementById("opAlertBtn").style.display = "inline";
	document.getElementById("opAlertTop").style.display = "inline";
	//ポップアップ以外は非活性
	document.getElementById("allbackgr").style.display = "inline";
}





